package 笔试.深信服.流;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        File file = new File("F:\\IDEA_test\\LeetCode\\src\\笔试\\深信服\\message.txt");
        try (FileInputStream fr = new FileInputStream(file)) {
            byte[] data = new byte[1024];
            int len;
            while ((len = fr.read(data)) != -1) {
                System.out.println(new String(data, 0, len));
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
